#pragma once
#ifndef OBR_TRANSFORM_H
#define OBR_TRANSFORM_H

#include "common.h"
#include "Quaternion.h"
#include "helpers/Helpers.h"


namespace OBR
{
class Transform
{
public:
    Matrix4x4f mat;

    Transform();
    Transform(Matrix4x4f _mat);
    Transform(float *_mat);
    virtual ~Transform();

    /**
     * @brief Get the Transform Matrix of this transform
     *
     * @return Matrix4x4f
     */
    virtual Matrix4x4f getTransformMatrix();

    Transform operator*(Transform &rhs);

private:
};

class SRTTransform : public Transform
{
public:
    float3 scale, translation;
    Quaternion rotation;

private:
public:
    SRTTransform();
    SRTTransform(float3 _scale, Quaternion _rotation, float3 _translation);

    /**
     * @brief Get the Transform Matrix of this transform in order Scale -> Rotate -> Translate
     *
     * @return Matrix4x4f
     */
    Matrix4x4f getTransformMatrix() override;

    OptixSRTData getSRTData();

private:
    void updateMatrix();
};


} // namespace OBR

#endif
